package log;

public class FileInfo {
	
	private String name;
	private String path;
	
	public FileInfo(String path){
		this.path = path;
		initName();
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	private void initName(){
		int lastIndex = path.lastIndexOf("/");
		if(lastIndex == -1)
			lastIndex = path.lastIndexOf("\"");
		
		if(lastIndex != -1){
			name = path.substring(lastIndex+1);
		}
		else{
			name = "NULL";
		}
		
		
	}

}
